﻿@using WebApp.Models
@model LoginViewModel
@{
    ViewBag.Title = "Sign in to continue";
    Layout = "~/Views/Shared/_Layout_CenterBox.cshtml";
}

@using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { role = "form" }))
{
    @Html.AntiForgeryToken()

    if (!Html.ViewData.ModelState.IsValid)
    {
        <div class="callout callout-danger">
            <h4>Error</h4>
            <p>@Html.ValidationSummary(true, "")</p>
        </div>
    }

    <div class="form-group has-feedback">        
        @Html.TextBoxFor(m => m.Email, new { @class = "form-control", @placeholder = "Email" })
        <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
        <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.Email)</div>
    </div>

    <div class="form-group has-feedback">
        @Html.PasswordFor(m => m.Password, new { @class = "form-control", @placeholder = "Password" })
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
        <div class="custom-validation-msg text-center">@Html.ValidationMessageFor(m => m.Password)</div>
    </div>

    <div class="row">
        <div class="col-xs-8">
            <div class="checkbox icheck">
                @Html.CheckBoxFor(m => m.RememberMe)
                &nbsp;
                @Html.LabelFor(m => m.RememberMe)                
            </div>
        </div>
        <div class="col-xs-4">
            <input type="submit" value="Sign In" class="btn btn-primary btn-block btn-flat" />
        </div>
    </div>

    <br />
    @*<div class="text-center"><p>- OR -</p></div>    
    <div class="to-mid text-center">
        <i class="fa fa-user"></i>&nbsp;
        <a href="@Url.Action("Register")" class="text-center">Register as a new user</a>
    </div>*@     

  @*<p>
        @Html.ActionLink("Forgot your password?", "ForgotPassword")
    </p>*@
}

@*@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })*@
 
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}